<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Medium
  </div>
  <div>
   <h1 class="question_title">
    11. Container With Most Water
   </h1>
   <p>
    Given
    <i>
     n
    </i>
    non-negative integers
    <i>
     a
     <sub>
      1
     </sub>
    </i>
    ,
    <i>
     a
     <sub>
      2
     </sub>
    </i>
    , ...,
    <i>
     a
     <sub>
      n&nbsp;
     </sub>
    </i>
    , where each represents a point at coordinate (
    <i>
     i
    </i>
    ,
    <i>
     a
     <sub>
      i
     </sub>
    </i>
    ).
    <i>
     n
    </i>
    vertical lines are drawn such that the two endpoints of line
    <i>
     i
    </i>
    is at (
    <i>
     i
    </i>
    ,
    <i>
     a
     <sub>
      i
     </sub>
    </i>
    ) and (
    <i>
     i
    </i>
    , 0). Find two lines, which together with x-axis forms a container, such that the container contains the most water.
   </p>
   <p>
    <strong>
     Note:&nbsp;
    </strong>
    You may not slant the container and
    <i>
     n
    </i>
    is at least 2.
   </p>
   <p>
    &nbsp;
   </p>
   <p>
    <img alt="" src="https://s3-lc-upload.s3.amazonaws.com/uploads/2018/07/17/question_11.jpg" style="width: 600px; height: 287px;">
   </p>
   <p>
    <small>
     The above vertical lines are represented by array [1,8,6,2,5,4,8,3,7]. In this case, the max area of water (blue section) the container can contain&nbsp;is 49.
    </small>
   </p>
   <p>
    &nbsp;
   </p>
   <p>
    <strong>
     Example:
    </strong>
   </p>
   <pre>
<strong>Input:</strong> [1,8,6,2,5,4,8,3,7]
<strong>Output:</strong> 49</pre>
  </div>
  <div>
   <h1 class="question_title">
    11. 盛最多水的容器
   </h1>
   <p>
    给定
    <em>
     n
    </em>
    个非负整数
    <em>
     a
    </em>
    <sub>
     1
    </sub>
    ，
    <em>
     a
    </em>
    <sub>
     2，
    </sub>
    ...，
    <em>
     a
    </em>
    <sub>
     n，
    </sub>
    每个数代表坐标中的一个点&nbsp;(
    <em>
     i
    </em>
    ,&nbsp;
    <em>
     a
     <sub>
      i
     </sub>
    </em>
    ) 。在坐标内画
    <em>
     n
    </em>
    条垂直线，垂直线
    <em>
     i
    </em>
    &nbsp;的两个端点分别为&nbsp;(
    <em>
     i
    </em>
    ,&nbsp;
    <em>
     a
     <sub>
      i
     </sub>
    </em>
    ) 和 (
    <em>
     i
    </em>
    , 0)。找出其中的两条线，使得它们与&nbsp;
    <em>
     x
    </em>
    &nbsp;轴共同构成的容器可以容纳最多的水。
   </p>
   <p>
    <strong>
     说明：
    </strong>
    你不能倾斜容器，且&nbsp;
    <em>
     n
    </em>
    &nbsp;的值至少为 2。
   </p>
   <p>
    <img alt="" src="https://aliyun-lc-upload.oss-cn-hangzhou.aliyuncs.com/aliyun-lc-upload/uploads/2018/07/25/question_11.jpg" style="height: 287px; width: 600px;">
   </p>
   <p>
    <small>
     图中垂直线代表输入数组 [1,8,6,2,5,4,8,3,7]。在此情况下，容器能够容纳水（表示为蓝色部分）的最大值为&nbsp;49。
    </small>
   </p>
   <p>
    &nbsp;
   </p>
   <p>
    <strong>
     示例:
    </strong>
   </p>
   <pre><strong>输入:</strong> [1,8,6,2,5,4,8,3,7]
<strong>输出:</strong> 49</pre>
  </div>
 </body>
</html>